#ifndef VAR_H
#define VAR_H

#include "sgeTypes.h"
#include "sgeMath.h"

namespace sge {

enum VarType {BOOL,INT,FLOAT,STRING,VECTOR,QUATERNION};

class Var;

typedef std::map<String,Var> StringVarMap;
typedef std::list<Var> VarList;

class Var {
private:
    union VarData {
        bool b;
        int i;
        float f;
        String *s;
        Vector3 *v;
        Quaternion *q;
    };
    
    VarData data;
    VarType type;
    bool dirty;
    
public:
    Var();
    ~Var();
    
    VarType getVarType() const;
    void setVarType(VarType _type);
    
    bool getB();
    int getI();
    float getF();
    String getS();
    Vector3 getV();
    Quaternion getQ();
    
    void setB(bool b);
    void setI(int i);
    void setF(float f);
    void setS(String s);
    void setV(Vector3 v);
    void setQ(Quaternion q);
    
    bool getDirty() const;
    void setDirty(bool _dirty);
};

}

#endif
